<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>报修记录</title>
    <link rel="stylesheet" href="{{ asset('tool/layui/css/layui.css') }}">
    <script src="{{ asset('tool/js/jquery.min.js') }}"></script>
    <script src="{{ asset('tool/layui/layui.js') }}"></script>
</head>
<body>

<div class="layui-container">

    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">报修单</li>
            {{--<li>其他</li>--}}
        </ul>

        <div class="layui-tab-content">
            @if(!$is_maintain_user)
            <div class="layui-btn-group">
                <a type="button" class="layui-btn layui-btn-normal" href="{{url('maintain-order-add')}}">报修</a>
            </div>
            @endif
            <div class="layui-tab-item layui-show">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th>日期</th>
                        <th>项目</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach ($maintainOrder as $order)
                    <tr>
                        <td>{{date('Y-m-d',strtotime($order->created_at))}}</td>
                        <td>{{$order->order_name}}</td>
                        <td>{{\App\Models\MaintainOrder::ORDER_STATUS[$order->order_status]}}</td>
                        <td><a class="layui-btn layui-btn-green layui-btn-sm" href="{{url('maintain-order-show', $order->id)}}">查看</a></td>
                    </tr>
                    @endforeach
                    </tbody>
                </table>

            </div>
            <div class="layui-tab-item">内容2</div>
        </div>
    </div>

</div>

<script>
    layui.use(['element','form','upload','layer'], function(){
        var element = layui.element;
        var layer = layui.layer
            ,form = layui.form;

    });
</script>

</body>
</html>
